home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / Difficulty.script < prev    next >
Text File  |  2001-12-21  |  2KB  |  106 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CDifficultyLevel
  11. {
  12.   float GetHelicopterHP()
  13.   {
  14.     int DifficultyLevel = Core_CallFunction(
  15.         SOID_GameMenu,
  16.         "GetDifficultyLevel"
  17.       );
  18.  
  19.     if (0 == DifficultyLevel)
  20.       return 7500.0;
  21.     else
  22.     if (1 == DifficultyLevel)
  23.       return 5000.0;
  24.     else
  25.     if (2 == DifficultyLevel)
  26.       return 2500.0;
  27.     else
  28.     if (3 == DifficultyLevel)
  29.       return 1000.0;
  30.  
  31.     Core_LogWarning("Invalid difficulty level " + DifficultyLevel);
  32.     return 2500.0;
  33.   }
  34.  
  35.   float GetCollisionDamageFactor()
  36.   {
  37.     int DifficultyLevel = Core_CallFunction(
  38.         SOID_GameMenu,
  39.         "GetDifficultyLevel"
  40.       );
  41.  
  42.     if (0 == DifficultyLevel)
  43.       return 0.0;
  44.     else
  45.     if (1 == DifficultyLevel)
  46.       return 0.5;
  47.     else
  48.     if (2 == DifficultyLevel)
  49.       return 1.0;
  50.     else
  51.     if (3 == DifficultyLevel)
  52.       return 2.0;
  53.  
  54.     Core_LogWarning("Invalid difficulty level " + DifficultyLevel);
  55.     return 2500.0;
  56.   }
  57.  
  58.   int GetS8MissileQuantity()
  59.   {
  60.     int DifficultyLevel = Core_CallFunction(
  61.         SOID_GameMenu,
  62.         "GetDifficultyLevel"
  63.       );
  64.  
  65.     if (0 == DifficultyLevel)
  66.       return 40;
  67.     else
  68.     if (1 == DifficultyLevel)
  69.       return 30;
  70.     else
  71.     if (2 == DifficultyLevel)
  72.       return 20;
  73.     else
  74.     if (3 == DifficultyLevel)
  75.       return 10;
  76.  
  77.     Core_LogWarning("Invalid difficulty level " + DifficultyLevel);
  78.     return 20;
  79.   }
  80.  
  81.   int GetVikhrMissileQuantity()
  82.   {
  83.     int DifficultyLevel = Core_CallFunction(
  84.         SOID_GameMenu,
  85.         "GetDifficultyLevel"
  86.       );
  87.  
  88.     if (0 == DifficultyLevel)
  89.       return 12;
  90.     else
  91.     if (1 == DifficultyLevel)
  92.       return 9;
  93.     else
  94.     if (2 == DifficultyLevel)
  95.       return 6;
  96.     else
  97.     if (3 == DifficultyLevel)
  98.       return 3;
  99.  
  100.     Core_LogWarning("Invalid difficulty level " + DifficultyLevel);
  101.     return 6;
  102.   }
  103. }
  104.  
  105.  
  106.